package com.wing.product.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wing.common.utils.JsonResult;
import com.wing.device.model.request.DeviceCategoryForm;
import com.wing.product.model.entity.ProductMaterialCategory;
import com.wing.product.model.request.ProductMaterialCategoryForm;
import com.wing.product.model.response.ProductMaterialCategoryVO;

import java.util.List;
import java.util.Map;

/**
 * 材料分类-Service
 *
 * @author
 */
public interface ProductMaterialCategoryService extends IService<ProductMaterialCategory> {

    /**
     * 添加
     *
     * @param productMaterialCategoryForm
     * @return
     */
    int add(ProductMaterialCategoryForm productMaterialCategoryForm);

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<ProductMaterialCategoryVO> list4app(Map<String, Object> params);

    /**
     * 分页list-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    Page<ProductMaterialCategoryVO> pageList4app(Page page, Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    ProductMaterialCategoryVO get4appById(Long id);

    int del(Long id);

    int enable(Long id);

    int disable(Long id);

    int update(ProductMaterialCategoryForm productMaterialCategoryForm);

    JsonResult getTreeData(Long productMaterialCategoryId);
}
